using LeaRun.Application.Code;
using System;
namespace LeaRun.Application.Entity.SystemManage
{
	public class DataSourceEntity : BaseEntity
	{
		public string Id
		{
			get;
			set;
		}
		public string Name
		{
			get;
			set;
		}
		public string Code
		{
			get;
			set;
		}
		public string DbId
		{
			get;
			set;
		}
		public string DbName
		{
			get;
			set;
		}
		public string Strsql
		{
			get;
			set;
		}
		public string Description
		{
			get;
			set;
		}
		public string CreateUserId
		{
			get;
			set;
		}
		public string CreateUserName
		{
			get;
			set;
		}
		public DateTime? CreateDate
		{
			get;
			set;
		}
		public string ModifyUserId
		{
			get;
			set;
		}
		public string ModifyUserName
		{
			get;
			set;
		}
		public DateTime? ModifyDate
		{
			get;
			set;
		}
		public override void Create()
		{
			this.Id = Guid.NewGuid().ToString();
			this.CreateDate = new DateTime?(DateTime.Now);
			this.CreateUserId = OperatorProvider.Provider.Current().UserId;
			this.CreateUserName = OperatorProvider.Provider.Current().UserName;
		}
		public override void Modify(string keyValue)
		{
			this.Id = keyValue;
			this.ModifyDate = new DateTime?(DateTime.Now);
			this.ModifyUserId = OperatorProvider.Provider.Current().UserId;
			this.ModifyUserName = OperatorProvider.Provider.Current().UserName;
		}
	}
}
